package com.niit.search.service.impl;

import com.niit.search.entity.User;
import com.niit.search.mapper.UserMapper;
import com.niit.search.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    @Override
    public List<User> searchUser(String keyword) {
        return userMapper.searchUserByKeyword(keyword);
    }

    @Override
    public List<User> searchUserByUsername(String keyword) {
        return userMapper.searchUserByUsername(keyword);
    }

    @Override
    public User getById(Long id) {
        return userMapper.selectById(id);
    }
} 